package com.learn.ioc.component;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SoldierService {
    SoldierDAO soldierDAO;

    public SoldierService(SoldierDAO soldierDAO) {
        this.soldierDAO = soldierDAO;
    }

    public void setSoldierDAO(SoldierDAO soldierDAO) {
        this.soldierDAO = soldierDAO;
    }

    public void getMessage() {
        soldierDAO.getMessage();
    }
}
